package com.calf.module.message.entity;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class MessageConstant {
	
	public abstract class Isread {
		/*******已读*********/
		public static final int isRead = 1 ;
		/*******未读*********/
		public static final int unRead = 2 ;
		
	}
	public abstract class Type {
		/*******个人信息*********/
		public static final int personal = 1 ;
		/*******通知信息*********/
		public static final int notice = 2 ;
		/*******活动消息*********/
		public static final int activity = 3 ;
		
	}
	public abstract class state {
		/*******有效*********/
		public static final int active = 1 ;
		/*******用户删除*********/
		public static final int deleted = 2 ;
		
	}
	/**
	 * 生成随机ID号
	 * @return String
	 */
	public static String generateId() {
		SimpleDateFormat dateFormater = new SimpleDateFormat("yyMMddHHmmss");
		Date date = new Date();
		int x;
		Random ne = new Random();
		x = ne.nextInt(999 - 100 + 1) + 100;
		return String.valueOf(dateFormater.format(date)) + String.valueOf(x);

	}
}
